import { Component } from '@angular/core';
import { ModalService, ConfirmService, Pagination } from 'ng-tui';
import { CostService } from '../../services/cost.service';
import { Goods } from '../../interfaces/cost.interface';
import { ApiData, SearchParams } from '../../../../cores/classes';
import { RequestService, GlobalService } from '../../../../cores/services';
@Component({
    template: `
    <div class="modal-header">
        <h5 class="modal-title">费用类别添加</h5>
        <button (click)="close()" type="button" class="close">
          <span aria-hidden="true">&times;</span>
        </button>
    </div>
    <div class="modal-body">
            <div class="card-body">
            <div class="input-group">
                <div class="input-group-prepend" >
                    <span class="input-group-text bg-white">费用类名称</span>
                </div>
                <input required class="form-control"  type="text"  placeholder="请输费用类名称" >
            </div>
               <br>
     </div>
    </div>
    <div class="modal-footer">
    <button tsBtn (click)="close()">取消</button>
    <button tsBtn loading color="success" (submit)="confirmSave($event)">确认保存</button>
    </div>`,
})
export class ModalComponent {
    // name="couponName"[(ngModel)]="voucher.couponName"
    // content = '...';
    // voucher: Voucher = { id: 0, isActive: 1, couponName: '', };
    changg: number;
    loading = false;
    search = new SearchParams({ status: '' });
    pagination = new Pagination();

    nowD = new Date();



    constructor(
        public modal: ModalService,
        private costService: CostService,
        private confirm: ConfirmService,
        public global: GlobalService,
    ) { }


    close() {
        this.modal.dismiss();
    }

    confirmSave(btn: any) {

    }
    // testa() {
    //     this.voucherService.insertCompany(this.voucher).subscribe({
    //         next: res => {
    //             this.confirm.success('添加成功', `'${this.voucher.couponName}`);
    //             this.close();
    //             this.loadDatas();

    //         }
    //     });
    // }


}

